# Maintainer: Natanael Copa <ncopa@alpinelinux.org>
pkgname=xfce4-screensaver
pkgver=4.18.2
pkgrel=0
pkgdesc="Screensaver and locker for XFCE"
url="https://gitlab.xfce.org/apps/xfce4-screensaver"
arch="all"
license="GPL-2.0-or-later"
depends="python3"
makedepends="
	dbus-glib-dev
	garcon-dev
	glib-dev
	gtk+3.0-dev
	libwnck3-dev
	libx11-dev
	libxext-dev
	libxfce4ui-dev
	libxklavier-dev
	libxrandr-dev
	libxscrnsaver-dev
	linux-pam-dev
	xfconf-dev
	"
subpackages="$pkgname-doc $pkgname-lang"
source="https://archive.xfce.org/src/apps/xfce4-screensaver/${pkgver%.*}/xfce4-screensaver-$pkgver.tar.bz2
	pam-base-auth.patch
	"
options="suid"
_libexecdir=/usr/lib/xfce4

build() {
	./configure \
		--build=$CBUILD \
		--host=$CHOST \
		--prefix=/usr \
		--sysconfdir=/etc \
		--libexecdir=$_libexecdir \
		--mandir=/usr/share/man \
		--localstatedir=/var \
		--enable-pam \
		--enable-locking
	make
}

check() {
	make check
}

package() {
	make DESTDIR="$pkgdir" install
}

sha512sums="
5ffeeabd1c8c425a6de8e70cddb6afb54a2e64d6df821655f564e118a9924da4fd21e2300515583fe97caa1c76aba3745801cccc377eb056eeecb98303b08df1  xfce4-screensaver-4.18.2.tar.bz2
0d53a0e9ee4b8bc5469b7b46068c614d188bb13dfc7d79565d61fae4c854dd4edc72ad7a785d09fb256d9e98564fa2325a2f8af7dbccad645fded5ed525d95ad  pam-base-auth.patch
"
